package com.wzcl.app.dao.repository;

import com.wzcl.app.dao.model.Specifications;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface SpecificationsRepository extends JpaRepository<Specifications,Integer>, JpaSpecificationExecutor<Specifications> {

    void deleteAllByCommodityId(Integer commodityId);

    List<Specifications> findAllByCommodityId(Integer commodityId);

    Specifications findByCommodityIdAndSpec(Integer commodityId, String spec);
}

